<extend name="Base/common"/>
<block name="style">
    <link href="__CSS__/jxgl.css" type="text/css" rel="stylesheet">
</block>
<block name="header">
    <include file="Public/_nav"/>
</block>
<block name="body">

      <!--   <include file="Public/_hot_sell"/> -->
        <!-- 左侧菜start -->
        <div class="col-xs-2">
             <div class="common_block_border">                
                <div class="content ">
                <include file="Public/sidebar"  />
                </div>
            </div>
        </div>
        <!-- 左侧菜end -->

    <!-- 右侧内容开始 -->
    <div class="col-xs-10">
    <div class="common_block_border">
    <ul class="nav nav-tabs">
   <li class="active"><a href="{:U('Lunwen/uploadLunwen')}">论文上传</a></li>
   <li><a href="{:U('Lunwen/viewLunwen')}">浏览论文</a></li>
   </ul>
     <!-- 登记表单start -->
     <div class="right_box">
                <legend><span style="color:#CC4444"> 学科论文上传 : </span>
           
                </legend>
                
        <form class="form-horizontal form-condensed" method='post' enctype="multipart/form-data" id="formlunwen" name="formlunwen"  action="" role="form">
        <!-- {:U('Index/addHomework')} -->
           <div class="form-group ">
          <label class="col-sm-2 control-lable text-right" for="subject">学科类别</label>
            <div class="col-sm-4">
                  <select name="subject" id="subject" class="form-control">
                      <option > 请选择学科类别 </option>
                      <option >语文</option>
                      <option >数学</option>
                      <option >英语</option>
                      <option >科学</option>
                      <option >综合</option>
                      <option >其他</option>  
                  </select>
              </div>
                 <label class="col-sm-1 control-lable text-right">教 师</label>            
               <div class="col-sm-4"> <input class="form-control" type="text"  name="teacher" value="{$my.nickname}" > </div>   
        　　</div>

            <div class="form-group">
                 <label class="col-sm-2 control-lable text-right">文章标题</label> 
                 <div class="col-sm-9">           
                <input class="form-control" type="text"  name="title" value="" > 
                </div>
                <div class="col-sm-offset-2 col-sm-9  has-error" > 
                    <div class="help-block alert alert-warning">
                    为保证文件正常上传,请不要在标题中使用特殊符号如“ * # ！ ^ & ” 等            
                   </div>
                </div>  
        　　</div>

             <div class="form-group">
               <label class="col-sm-2 control-lable text-right">上传文件 </label>
                 <div class="col-sm-9">
                     <div class="input-group">
                    <input id="lefile" class="form-control" type="file" name="upfile" style="display:none">               
                    <input id="files-text" class="form-control" type="text"  onclick="$('input[id=lefile]').click();">
                    <span class="input-group-btn">
                      <button class="btn btn-primary" type="button" onclick="$('input[id=lefile]').click();"><i class="icon icon-folder-open"> </i>    浏览文件</button>
                    </span>
                    </div>
                 </div>
               </div>
            <script type="text/javascript">
            $('input[id=lefile]').change(function() {
            $('#files-text').val($(this).val());
            });
            </script>
    
         <div class="form-group">
            <label class="col-sm-2 ">论文摘要</label><div class="col-sm-10 "><span class="check-tips">（请将论文摘要复制到下面框内,然后点击下面的上传按钮完成提交。）</span></div>
            <div class="col-sm-offset-1 col-sm-10" >
               <textarea name="abstract" class="form-control" rows="8"> </textarea>              
            </div>
            </div>
        <div class="form-group"> 
          <div class="col-sm-offset-1 col-sm-10">
            <button type="submit" class="btn btn-primary">上传论文</button>
            <button type="button" class="btn btn-danger">取消</button> 
          </div> 
        </div>
      </form> 
      <div class="right_box text-right"> 
      &nbsp; {:getPagination($totalPageCount,$r)}
      </div> 
      </div>
       <!-- 数据列表 --> 

       <div class="right_box">     
         <table class="table table-striped table-bordered">
             <thead>
            <tr class="info">                
                <th class="">序号</th>                                     
                <th class="">类别</th>
                <th class="">教师</th>
                <th class="">标题</th>                
                <th class="">文章摘要</th>
                <th class="">上传日期</th>                
                <th class="">操  作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="list">
                <volist name="list" id="vo">
                <tr>                    
                    <td>{$vo.id} </td>
                    <td>{$vo.subject}</td>
                    <td>{$vo.teacher}</td>
                    <td>{$vo.title}</td>
                    <td>{$vo.abstract|msubstr=0,20,'utf-8',true}</td>      
                    <td><span><if condition="($vo.update_time eq 0)"> &nbsp <else/>
                  {$vo.update_time|date='Y-m-d',###}</if></span></td>                        
                    <td>
                        <a href="{:U('Lunwen/editlunwen','id='.$vo['id'])}" >编辑</a> |                        
                        <a href="{:U('Lunwen/deletelunwen?id='.$vo['id'])}" class="authorize">删除</a>
                        
                        </td>
                </tr>
                </volist>
                <else/>
                <td colspan="8" class="text-center"> aOh! 暂时还没有内容! </td>
                </notempty>
            </tbody>
            </table>
    <div class="right_box text-right"> 
      &nbsp; {:getPagination($totalPageCount,$r)}
    </div>
    </div>
        <!-- 右侧内容结束 -->  
      </div>   


</block>

